package com.kunya.product.dao;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import com.kunya.common.common.ServerResponse;
import com.kunya.product.po.Question;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface QuestionMapper {
    int deleteByPrimaryKey(@Param("questionId") Long questionId,@Param("table_prefix") String tablePrefix);

    int insert(@Param("record") Question record,@Param("table_prefix") String tablePrefix);

    int insertSelective(@Param("record") Question record,@Param("table_prefix") String tablePrefix);

    Question selectByPrimaryKey(@Param("questionId") Long questionId,@Param("table_prefix") String tablePrefix);

    int updateByPrimaryKeySelective(@Param("record") Question record,@Param("table_prefix") String tablePrefix);

    int updateByPrimaryKey(@Param("record") Question record);
    //商品提问提交
     void insertQuestion(@Param("question") Question question,@Param("table_prefix") String tablePrefix);
    //根据根据商品ID和提问状态查找提问列表
    List<Question> selectQuestionsByProductId(@Param("productId") Long productId,@Param("table_prefix") String tablePrefix);
    //根据提问ID和商品ID查询商品提问详情
     Question detailsByQuestionId(@Param("questionId") Long questionId,@Param("productId") Long productId,@Param("table_prefix") String tablePrefixa);
    //商家回复
    void reply(@Param("question")Question question,@Param("questionId") Long questionId,@Param("table_prefix") String tablePrefix);
}